﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using AgileToDo.Common;
using AgileToDo.ViewModel;
using WinInterop = System.Windows.Interop;
using System.Data.Entity;
using Data;
using Entity;

namespace AgileToDo
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

        }

        private void DragWindow(object sender, MouseButtonEventArgs e)
        {
            this.hideTbx.Focus();//使其他控件失去焦点
            if(this.IsActive)
                this.DragMove();
        }


        private void Close_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            Application.Current.Shutdown();
        }


        private void Minimized_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.WindowState=WindowState.Minimized;
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.frame.Navigate(new LoginSelector());
        }

        
    }
}
